home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
futils.arc
/
FMISC.DOC
< prev
next >
Wrap
Text File
|
1991-04-28
|
2KB
|
68 lines
********************************************************************
************************* FMISC by Rex Kerr ************************
************************ Copyright (C) 1989 ************************
********************************************************************
This is a tiny unit written in assembly languge. There are just
5 procedures in it.
***
Qmove(var source,dest; len : word);
This works just like the Move procedure in standard TP, except it
is about twice as fast.
***
Qfill(fillw : word; var dest: len : word);
This works like the FillChar procedure in TP, except it fills words
instead of bytes. Len is the number of bytes to fill. If the length
is odd, it will be cut one byte short.
***
Qfillchar(var dest; len : word; fillc : byte);
This works just like the FillChar procedure in TP, except it is
about twice as fast.
***
QAscToStr(var Asc; var st : string);
This converts a null-terminated string into a Pascal string.
The first character in a Pascal string contains the length of the
string. A null-terminated string ends with the null character (#0),
and has nothing extra at the start. Pascal strings are easier to
use, and all of the functions and procedures in Turbo Pascal are for
Pascal strings. The only advantage of null-terminated strings is
that they are not limited to 255 characters.
***
QStrToAsc(var st : string; var Asc);
This converts a pascal string into a null-terminated string.
Here is a short example:
type nullstring = array[1..1000] of char;
var st : string;
nst : nullstring;
begin
st := 'Have a nice day!'
qstrtoasc(st,nst);
{ Nst = 'Have a nice day'#0 }
. . . { Do something that puts 'Thank you' in nst }
qasctostr(nst,st);
write(st); { This writes 'Thank you' }
end.
***
That's it.